<?php


$api_service_path = __DIR__ . "/../../../api/";
ob_start();
require_once($api_service_path . "public/index.php");
ob_end_clean();
/**
 * @Author:      lyt
 * @DateTime:  2017-03-29 10:52:56
 * @Description: 吧支付超时的订单算成支付失败
 */
//查找当前支付中的 支付时间潮湿的支付单
$wp=WeixinPayRecord::where("out_time","<",date("Y-m-d H:i:s",time()))->where("status",0)->get();
foreach ($wp as $_wp) {
    if($_wp->order_type=="xc"){
        $_wp->status=2;                    
        $_wp->save();
        CarWashOrderPayRecord::where("order_id",$_wp->order_id)->update(array("status"=>2));
    }
}